package com.fyzk.activity.user;

import java.util.ArrayList;
import java.util.List;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;

import com.fyzk.bean.RecordInfoBase;

public class RecordBaseAdapter extends BaseAdapter {

	public  final String TAG = this.getClass().getSimpleName();

	protected Context context;
	protected List<RecordInfoBase> list = new ArrayList<RecordInfoBase>();

	public RecordBaseAdapter(Context context, List<RecordInfoBase> list) {
		this.context = context;
		this.list = list;
	}

	@Override
	public int getCount() {
		if (list == null) {
			return 0;
		}
		return list.size();
	}

	@Override
	public Object getItem(int arg0) {

		return list.get(arg0);
	}

	@Override
	public long getItemId(int arg0) {

		return arg0;
	}
	
	

	@Override
	public View getView(int arg0, View arg1, ViewGroup arg2) {
		
		return arg1;
	}

	public void setList(List<RecordInfoBase> list) {

		this.list = list;
		this.notifyDataSetChanged();
	}

	public List<RecordInfoBase> getList() {
		return this.list;
	}

}
